<?php
	function checkNum($num){
	  return ($num%2) ? TRUE : FALSE;
	}
?>
<div id="page-content" class="clearfix">
			
			<h1>Articles</h1>
			
			<h2>Group title goes here <span>(short description)</span></h2>
			<div class="inner-box clearfix">
			
				<div id="table-block" class="wide">

					<table cellspacing="0" cellpadding="0">
					<tbody>
						<tr class="header">
							<td>ID</td>
							<td>Title</td>
							<td>Description</td>
							<td>Date Created</td>
							<td>Last Updated</td>
							<td>Status</td>
							<td>Actions</td>
						</tr>
						
						<?php $num = 0?>
						
						<?php foreach ($content as $ox_article): ?>

						<?php $num++?>
						
						<?php if(checkNum($num) === TRUE){?>
						
						<tr>
							<td><?=$ox_article['article_id']?>.</td>
							<td><?=$ox_article['title']?></td>
							<td><?=$ox_article['excerpt']?></td>
							<td><?=$ox_article['date_created']?></td>
							<td><?=$ox_article['date_updated']?></td>
							<td class="true"><?=$ox_article['status']?></td>
							<td class="actions">
								<?php if($this->auth->check('level',5)){?>
									<a class="edit" href="<?=base_url();?>admin/articles/edit/<?=$ox_article['article_id']?>">edit</a> | <a class="delete" href="#">delete</a>
								<?php } ?>
								
							</td>
						</tr>
						
						  
						<?php }else{ ?>
						
						<tr class="alternate">
							<td><?=$ox_article['article_id']?>.</td>
							<td><?=$ox_article['title']?></td>
							<td><?=$ox_article['excerpt']?></td>
							<td><?=$ox_article['date_created']?></td>
							<td><?=$ox_article['date_updated']?></td>
							<td class="false"><?=$ox_article['status']?></td>
							<td class="actions">
								<?php if($this->auth->check('level',5)){?>
									<a class="edit" href="<?=base_url();?>admin/articles/edit/<?=$ox_article['article_id']?>">edit</a> | <a class="delete" href="#">delete</a>
								<?php } ?>
							</td>
						</tr>
						
						<?php } ?>
						
						<?php endforeach ?>
						
					</tbody>
				</table>
				
				</div>
			
			</div>